package com.example.service.k3Service;


import com.example.bean.crm.*;
import com.example.bean.k3.ssdd;
import com.example.mapper.k3.k3Mapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Map;


/**
 * Created by tony on 2017/8/8.
 */
@Service
public class k3Service implements k3Mapper {

    @Resource
    private k3Mapper k3Mapper;
    /**
     * 取得职员
     * @param model
     * ALL全部职员，NEW最新职员
     */
    @Override
    public ArrayList<zyb> selectAllZy(String model) {
        return k3Mapper.selectAllZy(model);
    }
    /**
     * 标示职员已经插入中间表
     *
     */
    @Override
    public void updateZy(String FItemId) {
        k3Mapper.updateZy(FItemId);
    }

    /**
     * 取得物料
     * @param model
     * ALL全部物料，NEW最新物料
     */
    @Override
    public ArrayList<wlb> selectAllWl(String model) {
        return k3Mapper.selectAllWl(model);
    }
    /**
     * 标示物料已经插入中间表
     *
     */
    @Override
    public void updateWl(String FItemId) {
        k3Mapper.updateWl(FItemId);
    }

    /**
     * 查询部门
     * @return Map
     */
    @Override
    public Map selectBm(String name) {
        return k3Mapper.selectBm(name);
    }
    /**
     * 查询客户编码
     * @return Map
     * */
    @Override
    public Map selectCustomer(String id) {
        return k3Mapper.selectCustomer(id);
    }
    /**
     * 查询danwei
     * @param name
     * */
    @Override
    public Map selectUnit(String name) {
        return k3Mapper.selectUnit(name);
    }

    /**
     *更新销售订单的整单折扣率和整单折扣额
     * @param cgdd
     * */
    @Override
    public void updateSo(cgdd cgdd) {
         k3Mapper.updateSo(cgdd);
    }
    /**
     * 查询销售出库
     *
     */
    @Override
    public ArrayList<ckb> selectCk() {
        return k3Mapper.selectCk();
    }
    /**
     * 标示销售出库已经插入中间表
     *
     */
    @Override
    public void updateCk(String FBillNo) {
        k3Mapper.updateCk(FBillNo);
    }
    /**
     * 更新销售出库经销商收货
     *
     */
    @Override
    public void updateJxssh(ckb ckb) {
        k3Mapper.updateJxssh(ckb);
    }
    /**
     * 查询不能销售单据
     *
     */
    @Override
    public ArrayList<cgdd> selectSo() {
        return k3Mapper.selectSo();
    }

    @Override
    public ArrayList<fhb> selectFh() {
        return k3Mapper.selectFh();
    }
    /**
     * 查询删除的发货
     *
     */
    @Override
    public ArrayList<String> selectDeFh() {
        return  k3Mapper.selectDeFh();
    }

    /**
     * 标示发货已经插入中间表
     *
     */
    @Override
    public void updateFh(String FBillNo) {
        k3Mapper.updateFh(FBillNo);
    }
    /**
     *  生成销售订单
     *
     */
    @Override
    public void insertSo(cgdd cgdd) {
         k3Mapper.insertSo(cgdd);
    }
    /**
     *  查询销售订单单据头
     *
     */
    @Override
    public Map selectSoInformation(String cgddID) {
        return k3Mapper.selectSoInformation(cgddID);
    }
    /**
     *  生成销售订单
     *
     */
    @Override
    public void insertSoEntry(cgddmx cgddmx) {
        k3Mapper.insertSoEntry(cgddmx);
    }
    /**
     * 删除销售订单
     *
     */
    @Override
    public void deleteSo(String cgddID) {
        k3Mapper.deleteSo(cgddID);
    }

    @Override
    public void insertSk(skb skb) {
        k3Mapper.insertSk(skb);
    }

    @Override
    public Map selectSkInformation(String skbID) {
        return k3Mapper.selectSkInformation(skbID);
    }

    @Override
    public void insertSkEntry(skbmx skdmx) {
        k3Mapper.insertSkEntry(skdmx);
    }

    @Override
    public void deleteSk(String skbID) {
        k3Mapper.deleteSk(skbID);
    }
    /**
     * 修改经销商
     *
     */
    @Override
    public void updateJsx(jxsb jxsb) {
        k3Mapper.updateJsx(jxsb);
    }


}
